﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AdminSystem.Doamins
{
    /// <summary>
    /// 商品表
    /// </summary>
    
    [Table("Commodity")]
    public class Commodity
    {
        [Key]
        [Display(Name = "自增标识列")]
        public int Id { get; set; }

        [Required]
        [Display(Name = "商品名称")]
        [Column(TypeName = "nvarchar(50)")]
        public string? CommodityName { get; set; }

        [Required]
        [Display(Name = "创建人")]
        [Column(TypeName = "nvarchar(20)")]
        public string? CreateBy { get; set; }

        [Required]
        [Display(Name = "创建时间")]
        public DateTime? CreateDate { get; set; } = DateTime.Now;

        [Required]
        [Display(Name = "修改人")]
        [Column(TypeName = "nvarchar(20)")]
        public string? UpdateBy { get; set; }

        [Required]
        [Display(Name = "修改时间")]
        public DateTime? UpdateDate { get; set; } = DateTime.Now;

        [Required]
        [Display(Name = "逻辑删除")]
        public bool IsDel { get; set; } = false;
    }
}
